package com.yoke.controller.admin;

import com.yoke.common.OrderBaseControl;
import com.yoke.service.order.ProductService;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.io.IOException;

/**
 * Created by jiangzeyin on 2017/5/16.
 */
@Controller
public class IndexControl extends OrderBaseControl {

    @Resource
    ProductService productService;

    @RequestMapping(value = {"index.html", ""}, produces = MediaType.TEXT_HTML_VALUE)
    public String index() throws IOException {
        request.setAttribute("userName", userName);
        request.setAttribute("array", productService.getUserAll(userName));
        return "index";
    }


}
